<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>合作商信息-修改</title>
    <meta name="description" content="这是一个用户信息页面">
    <meta name="keywords" content="用户信息">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="${contextPath}/assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="${contextPath}/assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <link rel="stylesheet" href="${contextPath}/assets/css/amazeui.min.css"/>
    <link rel="stylesheet" href="${contextPath}/assets/css/amazeui.datatables.min.css"/>
    <link rel="stylesheet" href="${contextPath}/assets/css/app.css">
    <script src="${contextPath}/assets/js/jquery.min.js"></script>

</head>

<body data-type="widgets">
<script src="${contextPath}/assets/js/theme.js"></script>
<div class="am-g tpl-g">
    <!-- 头部 -->
    <#include "/pc/common/header.html" />
    <!-- 侧边导航栏 -->
    <#include "/pc/common/left.html" />
    <!-- 内容区域 -->
    <div class="tpl-content-wrapper">
        <div class="row-content am-cf">
            <div class="row">
                <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                    <div class="widget am-cf">
                        <ol class="am-breadcrumb widget-head">
                            <li><a href="${contextPath}/index.htm" class="am-icon-home">首页</a></li>
                            <li>系统管理</li>
                            <li><a href="${contextPath}/merchant/list.htm">合作商管理</a></li>
                            <li>详情</li>
                        </ol>
                        <div class="widget-body am-fr">
                            <div class="am-u-sm-12">
                                <div class="am-u-sm-3 am-text-center">
                                    <#if merchant.mtimg?? && merchant.mtimg!=''>
                                        <img class="am-radius" src="${merchant.mtimg!''}" height="135" /><br>
                                        <#else>
                                            <img class="am-radius" src="${contextPath}/img/nopic.jpg" height="135" /><br>
                                    </#if>
                                    <small>合作商头像</small>
                                </div>
                                <div class="am-u-sm-4">
                                    <p><strong>所属城市：</strong>
                                        <#if merchant.cityid??>
                                            ${dict.getCityName(merchant.cityid?c)}
                                        </#if>
                                    </p>
                                    <p><strong>联系人：</strong>${merchant.contact!''}</p>
                                    <p><strong>联系人电话：</strong>${merchant.tel!''}</p>
                                    <p><strong>店内座机：</strong>${merchant.landline!''}</p>
                                    <#if member?? && Session.manager_js==4>
                                    <div class="am-dropdown am-btn-group-sm" data-am-dropdown  style="padding-bottom: 10px">
                                        <button class="am-btn am-btn-success am-dropdown-toggle" data-am-dropdown-toggle>
                                            <i class="am-icon-qrcode"></i>
                                            推广码
                                            <span class="am-icon-caret-down"></span>
                                        </button>
                                        <div class="am-dropdown-content am-text-center">
                                            <i>有效期 2017-09-09</i>
                                            <img src="${contextPath}/img/qrcode.jpg">
                                            <a class="am-btn am-btn-success am-btn-xs" style="margin-top: 10px" href="">
                                                下载二维码
                                                <i class="am-icon-cloud-download"></i>
                                            </a>
                                        </div>
                                    </div>
                                    </#if>
                                </div>
                                <div class="am-u-sm-5">
                                    <p><strong>合作商名：</strong>${merchant.mtname!''}</p>
                                    <p><strong>服务内容：</strong>${merchant.tips!''}</p>
                                    <p><strong>所在地址：</strong>${merchant.provincename!''}${merchant.cityname!''}${merchant.regionname!''}${merchant.addr!''}</p>
                                    <#if merchant.createtime??>
                                        <p><strong>注册时间：</strong>${merchant.createtime?string('yyyy-MM-dd HH:mm:ss')}</p>
                                    </#if>
                                    <#if member?? && Session.manager_js==4>
                                        <div class="am-dropdown am-btn-group-sm" data-am-dropdown style="padding-bottom: 10px">
                                            <button class="am-btn am-btn-success am-dropdown-toggle" data-am-dropdown-toggle>
                                                <i class="am-icon-qrcode"></i>
                                                收款码
                                                <span class="am-icon-caret-down"></span>
                                            </button>
                                            <div class="am-dropdown-content am-text-center">
                                                <img src="${contextPath}/img/qrcode.jpg">
                                                <a class="am-btn am-btn-success am-btn-xs" style="margin-top: 10px" href="">
                                                    下载二维码
                                                    <i class="am-icon-cloud-download"></i>
                                                </a>
                                            </div>
                                        </div>
                                    </#if>
                                </div>
                            </div>
                            <#if member??>
                                <div class="am-u-sm-12" style="padding-top: 30px;border-top: 1px solid #eef1f5">
                                    <div class="am-u-sm-3 am-text-center">
                                        <#if member.headimg?? && member.headimg!=''>
                                            <img class="am-radius" src="${member.headimg}" height="100" /><br>
                                            <#else>
                                                <img class="am-radius" src="${contextPath}/img/nopic.jpg" height="135" /><br>
                                        </#if>
                                        <small>会员头像</small>
                                    </div>
                                    <div class="am-u-sm-4">
                                        <p><strong>会员昵称：</strong>${member.nickname!}</p>
                                        <p><strong>真实姓名：</strong>${member.realname!''}</p>
                                        <p><strong>注册时间：</strong>
                                            <#if member.createtime??>
                                                ${member.createtime?string('yyyy-MM-dd HH:mm:ss')}
                                            </#if>
                                        </p>
                                    </div>
                                    <div class="am-u-sm-5 am-btn-group-sm">
                                        <p><strong>手机号：</strong>${member.tel!''}</p>
                                        <p><strong>身份证号：</strong>${member.cardno!''}</p>
                                        <#if Session.manager_js==4>
                                        <button class="am-btn am-btn-danger am-dropdown-toggle" data-am-dropdown-toggle onclick="relieve()">
                                            解除绑定
                                        </button>
                                        </#if>
                                    </div>
                                </div>
                            <#elseif Session.manager_js==4>
                                <div class="am-u-sm-12 am-text-center" style="padding-top: 10px;border-top: 1px solid #eef1f5">
                                    <strong class="am-text-warning  am-icon-warning">请先扫描二维码绑定微信会员</strong><br>
                                    <img src="${contextPath}/qrcode/read.png?size=300&content=${qrContent!}">
                                </div>
                            </#if>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
<#include "/pc/common/alert.html" />
<script src="${contextPath}/assets/js/amazeui.min.js"></script>
<script src="${contextPath}/assets/js/amazeui.datatables.min.js"></script>
<script src="${contextPath}/assets/js/dataTables.responsive.min.js"></script>
<script src="${contextPath}/assets/js/amazeui.page.js"></script>
<script src="${contextPath}/assets/js/app.js"></script>
<script>
    function relieve() {
        Mconfirm("你确解除绑定吗？", function () {
            $.ajax({
                url: "${contextPath}/merchant/relieve.htm",
                type: "get",
                dataType: "json",
                success: function (data) {
                    var json = $.parseJSON(data);
                    Malert(json.errMessage, function () {
                        location.reload();
                    });
                }
            });
        });
    }
</script>
</body>

</html>